package com.adapter.demo04;

/**
 * 源角色:方
 */
public class Cube {
    private double width;
    public Cube(double width){
        this.width = width;
    }

    // 计算面积
    public double calculateArea(){
        return 6 * width * width;
    }

    // 计算体积
    public double calculateVolume(){
        return width * width * width;
    }

    public double getWidth() {
        return width;
    }
}
